home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’97
/
Crash & Burn
/
source code
/
(Internalized Files)
/
Development
/
Libraries
/
Hubauer
/
RectUtilities.h
< prev
Wrap
C/C++ Source or Header
|
1995-03-14
|
518b
|
17 lines
#pragma once
class RectUtil{
public:
static void ScaleRectToFit(Rect* objRect,Rect* enclRect);
static void ScaleRectToContain(Rect* enclRect,Rect* objRect);
static void CenterRectToFit(Rect* theRect,Rect* enclRect);
static void CenterRectOnPoint(Rect* theRect,Point center);
static void LocalToGlobal(Rect* theRect);
static void GlobalToLocal(Rect* theRect);
static short RectWidth(const Rect& r)
{ return r.right - r.left;}
static short RectHeight(const Rect& r)
{ return r.bottom - r.top;}
};